package checklist.db;

public class DAOFactorySingleton {
	private static final DAOTranslator daoTransalator = new FileDAOTransalator();
	
	public static <T> T instance(Class<T> daoInterface) {		
		try {			
			return (T) daoTransalator.findClass(daoInterface).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
		} catch (Exception e) {
			throw new RuntimeException(e.getMessage());
		}
	}

}
